<template>
  <view class="container">
    <view class="content">
      <view class="card" @click="navigateTo('erweima')">
        <view class="card-left">
          <text class="card-title">二维码</text>
          <text class="card-subtitle">向客户展示二维码</text>
        </view>
        <image class="card-icon" src="/static/images/center01.png" mode="aspectFit"></image>
      </view>
      <view class="card" @click="navigateTo('myorder')">
        <view class="card-left">
          <text class="card-title">我的订单</text>
          <text class="card-subtitle">管理客户订单，修改签署合同</text>
        </view>
        <image class="card-icon" src="/static/images/center02.png" mode="aspectFit"></image>
      </view>
	  <view class="card" @click="navigateTo('managesale')">
	    <view class="card-left">
	      <text class="card-title">售票管理</text>
	      <text class="card-subtitle">修改路线价格</text>
	    </view>
	    <image class="card-icon" src="/static/images/center02.png" mode="aspectFit"></image>
	  </view>
    </view>
  </view>
</template>

<script>
export default {
  methods: {
    navigateTo(page, title = '') {
      switch (page) {
        case 'erweima':
          uni.navigateTo({
            url: '/pages/salesman/erweima/QRcodedisplay'
          });
          break;
        case 'myorder':
          uni.switchTab({
            url: '/common/pages/order/order'
          });
          break;
        case 'managesale':
          uni.navigateTo({
            url: '/pages/salesman/saleManage/saleManage' // 示例路径，请根据实际情况修改
          });
          break;
        default:
          console.warn('Unknown page:', page);
      }
    }
  }
}
</script>

<style scoped>
.container {
  padding: 20rpx;
  background-color: #f5f5f5;
  height: 1500px;
}
.header {
  padding: 20rpx 0;
}

.title {
  font-size: 36rpx;
  font-weight: bold;
}

.content {
  margin-top: 20rpx;
}

.card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, #fefeff, #f3fcff);
  box-shadow: 2px 5px 5px gainsboro;
  /* background-color: #ffffff; */
  padding: 30rpx;
  /* border:1px solid red; */
  border-radius: 20rpx;
  margin-bottom: 20rpx;
}
.card-left {
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 32rpx;
  font-weight: bold;
  margin-bottom: 10rpx;
}

.card-subtitle {
  font-size: 24rpx;
  color: #999999;
}

.card-icon {
  width: 150rpx;
  height: 150rpx;
}
</style>